package com.demo.dubbo.provider.service.impl;

import com.demo.dubbo.api.service.ConsumerService;
import com.demo.dubbo.api.service.ProviderService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author yt
 * @date 2021/4/25
 */
@DubboService
public class ProviderServiceImpl implements ProviderService {

    @DubboReference
    private ConsumerService consumerService;

    public String provider() {
        String consumer = consumerService.consumerToProvider();
        return consumer + " TO PROVIDER";
    }

    public String providerToConsumer() {
        return "THIS IS DUBBO PROVIDER";
    }

}
